<template>
  <a-config-provider :locale="locale">
    <AvicModal
      ref="avicBpmModal"
      :visible="visible"
      :title="modalTitle"
      :width="modalWidth"
      :height="modalHeight"
      :body-style="setModalBodyStyle"
      :full-screen="true"
      :destroy-on-close="true"
      :footer="null"
      @ok="handleClose"
      @cancel="handleClose"
    >
      <FlowDetail ref="avicBpmModalFlowDetail" :view-mode="viewMode" :params="params" />
    </AvicModal>
  </a-config-provider>
</template>
<script>
import FlowDetail from '@/views/avic/bpm/flowdetail/index.vue';
// import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN';
import zhCN from 'ant-design-vue/es/locale/zh_CN';
export default defineComponent({
  name: 'AvicBpmModal',
  components: { FlowDetail },
  props: {
    modalTitle: {
      type: String,
      default: ''
    },
    viewMode: {
      type: String,
      default: ''
    },
    params: {
      type: Object,
      default: null
    }
  },
  data() {
    return {
      visible: true,
      modalWidth: '900px',
      modalHeight: '520px',
      setModalBodyStyle: {
        padding: 0,
        overflowY: 'hidden'
      },
      locale: zhCN
    };
  },
  methods: {
    handleClose() {
      this.visible = false;
      this.$emit('close');
    }
  }
});
</script>
